import { request } from "@/utils/request.js"

// 地址列表
export function addressAddressList(data = {}) {
	return request({
		url: '/user/address/addressList',
		data
	})
}

// 添加地址
export function addressAddAddress(data = {}) {
	return request({
		url: '/user/address/addAddress',
		data,
		showMsg: true
	})
}

// 编辑地址
export function addressUpdateAddress(data = {}) {
	return request({
		url: '/user/address/updateAddress',
		data,
		showMsg: true
	})
}

// 删除地址
export function addressDeleteAddress(data = {}) {
	return request({
		url: '/user/address/deleteAddress',
		data,
		showMsg: true
	})
}

// 设置默认地址
export function addressSetDefaultAddress(data = {}) {
	return request({
		url: '/user/address/setDefaultAddress',
		data,
		showMsg: true
	})
}

// 获取默认地址
export function addressGetDefaultAddress(data = {}) {
	return request({
		url: '/user/address/getDefaultAddress',
		data
	})
}

// 地址详情
export function addressInfo(data = {}) {
	return request({
		url: '/user/address/info',
		data
	})
}

// 国家列表
export function addressCountryList(data = {}) {
	return request({
		url: '/user/address/countryList',
		data
	})
}

// 省列表
export function addressProvinceList(data = {}) {
	return request({
		url: '/user/address/provinceList',
		data
	})
}

// 市列表
export function addressCityList(data = {}) {
	return request({
		url: '/user/address/cityList',
		data
	})
}

// 区列表
export function addressAreaList(data = {}) {
	return request({
		url: '/user/address/areaList',
		data
	})
}